package org.erepublik.company.comparators;

import java.util.Comparator;

import org.erepublik.company.CountryData;

public class CountryDataComparatorByCurrencyPrice implements Comparator<CountryData>  {

    @Override
    public int compare(CountryData o1, CountryData o2) {
        double comparator = o1.getCurrencyForGold()-o2.getCurrencyForGold();
        if (comparator < 0)
            return -1;
        if (comparator > 0)
            return 1;
        return 0;
    }

}